﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Security.Cryptography;
using System.IO;
using System.Text;

using CE.Global;

public partial class car_insurance_email_usermessage : MyLanguageAndSessionBasePage
{
    string _redirectUrl = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        Master.Page.Title = Resources.Title.EmailThisMessageTitle;

        LiteralControl newln = new LiteralControl(Environment.NewLine);
        HtmlMeta language = new HtmlMeta();
        language.Name = "language";
        language.Content = Resources.Title.PageLanguage;

        HtmlMeta keywords = new HtmlMeta();
        keywords.Name = "keywords";
        keywords.Content = Resources.Title.EmailThisMessageKeyword;

        HtmlMeta description = new HtmlMeta();
        description.Name = "description";
        description.Content = Resources.Title.EmailThisMessageDescription;

        Page.Header.Controls.AddAt(10, new LiteralControl(Environment.NewLine));
        Page.Header.Controls.AddAt(11, language);
        Page.Header.Controls.AddAt(12, new LiteralControl(Environment.NewLine));
        Page.Header.Controls.AddAt(13, keywords);
        Page.Header.Controls.AddAt(14, new LiteralControl(Environment.NewLine));
        Page.Header.Controls.AddAt(15, description);

    }

    protected void btnBack_Click(object sender, EventArgs e)
    {
        if (Session["FromSummary"] != null)
        {
            if (Session["FromSummary"].ToString().Trim() == "1")
            {
                _redirectUrl = CE.Global.General.GetUrl("~/car-insurance/quote-results.aspx", Page);
            }
            else
            {
                _redirectUrl = CE.Global.General.GetUrl("~/car-insurance/quote-results-details.aspx", Page);
            }

            Response.Redirect(_redirectUrl);
        }
        else
        {
            _redirectUrl = CE.Global.General.GetUrl("~/car-insurance/quote-results.aspx", Page);
            Response.Redirect(_redirectUrl);
        }
    }
    
}
